<div class="jumbotron">
	<table class="table table-bordered table-hover table-condensed">
	    <tr>
	    	<th colspan="7">我的书架（手机端同步）</th>
	    </tr>
	    <tr>
	    	<th>序号</th>
	    	<th>小说名称</th>
	    	<th>作者</th>
	    	<th>最新章节</th>
	    	<th>最新章节上次阅读章节</th>
	    	<th>添加时间</th>
	    	<th>操作</th>
	    </tr>
	    <volist name="shelfs" id="vo" key="k">
	    	<tr id="tr-shelf-<{$vo.shelf_id}>">
	    		<td><{$k}></td>
	    		<td><a href="/<{$vo.book_id}>.html"><{$vo.book_name}></a></td>
	    		<td><{$vo.author_name}></td>
	    		<td><a  style="color:red;" href="/<{$vo.book_id}>-<{$vo.new_article_id}>.html"><{$vo.new_article_name}></a></td>
	    		<td><a href="/<{$vo.book_id}>-<{$vo.article_id}>.html"><{$vo.article_name}></a></td>
	    		<td><{$vo.time|date='Y-m-d',###}></td>
	    		<td>
	    			<a data-toggle="tooltip" data-placement="left" title="跳至" href="/<{$vo.book_id}>.html">
	    				<i class="glyphicon glyphicon-fast-forward"></i>
	    			</a>
	    			<a data-toggle="tooltip" data-placement="right" title="删除" href="javascript:delShelf(<{$vo.shelf_id}>);">
	    				<i class="glyphicon glyphicon-trash"></i>
	    			</a>
	    		</td>
	    	</tr>
	    </volist>
	</table>
</div>
<script>
function delShelf(shelf_id = 0){
	if(shelf_id > 0){
		$.ajax({
         type: "POST",
         url: "<{:U('Member/delBookForShelf')}>",
         data: "shelf_id="+shelf_id,
         success: function(msg){
            if(msg == 'success'){
            	$('#tr-shelf-'+shelf_id).remove();
              swal({
                   title:"已成功从我的书架移除",
                   text:"",
                   type:"success"
               });
            }else{
              swal({
                   title:"网络不稳定，添加失败！",
                   text:"",
                   type:"error"
               });
            }
         }
      });

	}
}
</script>